﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.ComponentModel.DataAnnotations;
using BCDto.OA.WorkflowTemplate.WorkflowTemplateStepFormDatabaseConfig;
using BCDto.OA.WorkflowTemplate.WorkflowTemplateStepFormItem;

namespace BCDto.OA.WorkflowTemplate.WorkflowTemplateStepFormConfig
{
	/// <summary>
	/// 工作流模板步骤表单配置
	/// </summary>
	public class WorkflowTemplateStepFormConfigRequestDto
	{
		/// <summary>
		/// 表单分类Code
		/// </summary>		
		[Display(Name = "表单分类Code")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(50, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string FormCategoryCode { get; set; }
		/// <summary>
		/// 表单配置标题
		/// </summary>		
		[Display(Name = "表单配置标题")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(100, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string FormConfigTitle { get; set; }
		/// <summary>
		/// 表单配置Code
		/// </summary>		
		[Display(Name = "表单配置Code")]
		[Required(ErrorMessage = "{0} 不应为空")]
		[StringLength(100, MinimumLength = 2, ErrorMessage = "{0} 长度应大于{2} 且小于{1}")]
		public string FormConfigCode { get; set; }
		/// <summary>
		/// 是否为特殊表单
		/// </summary>
		[Display(Name = "是否殊表单")]
		[Required(ErrorMessage = "{0} 不应为空")]
		public bool IsSpecificForm { get; set; }
		/// <summary>
		/// 特殊表单名称
		/// </summary>
		[Display(Name = "特殊表单名称")]
		[MaxLength(100, ErrorMessage = "{0} 长度应小于{1}")]
		public string SpecificFormName { get; set; }
		/// <summary>
		/// 模板表单项
		/// </summary>		
		[Display(Name = "模板表单项")]
		public List<WorkflowTemplateStepFormItemRequestDto> FormItemTemplate { get; set; }
		/// <summary>
		/// 表单数据库配置列表
		/// </summary>		
		[Display(Name = "表单数据库配置列表")]
		public List<WorkflowTemplateStepFormDatabaseConfigRequestDto> DatabaseConfig { get; set; }
	}
}

